﻿
operate_menue_control =
{
    init = function ()
        ierd_tgp.tpf_ui.Require("frame_bottom\\wg_frame_bottom\\operate_menu_view.lua");
    end;

    open_operate_menue = function(json_str)
        local param_table = base_utility.json_to_table(json_str);
        operate_menue_view.show(param_table['xoffset'], param_table['yoffset'], 
                                param_table['width'], param_table['height'], param_table['id']);
    end;

    hide_operate_menue = function(event_id, json_str)
        operate_menue_view.hide();
    end;

    excute_game_act = function(game_action, game_id, server_id)
        base_utility.log("excute_game_act, action:%d, game_id, %d", game_action, game_id);
        local zone_id = server_id;
        if zone_id == nil then
            zone_id = 0;
        end;
        if uin == nil then
            uin = 0;
        end;
        local action_info = {
                  game_id_ = game_id,
                  zone_id_ = zone_id,
                  version_ = 0,
                  uid_ = login_model.main_uin,
                  launch_op_from = ierd_tgp.game_library.LAUNCH_OP_FROM_LANDING_PAGE
              };
        WGGameAction.excute_action(game_action, action_info);
    end;
};

operate_menue_control.init();
